//
//  CXDelegateTestVC.swift
//  CXSwiftDemo
//
//  Created by 潮汐 on 2023/12/7.
//

import UIKit

//遵守代理
class CXDelegateTestVC: CXBaseViewController, testDelegate {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.titleNavLabel.text = "协议代理"

        let testView = CXDelegateTestView()
        testView.delegate = self//设置代理
        testView.testFun()
        // Do any additional setup after loading the view.
        
        //发通知
        NotificationCenter.default.post(name: Notification.Name("testnotification"), object: self, userInfo: ["name":"潮汐"])
    }
    
//MARK: ------实现代理方式----------
    func changeString(userName: String) {
        print("代理传值：\(userName)")
        
    }
}
